<?php
spl_autoload_register(function ($className){
    $dir = __DIR__;
    $file = "${dir}/../${className}.php";
    if(is_file($file)){
        require_once $file;
    }else{
        throw new ErrorException("类加载文件无法找到:".$file);
    }
});
